package com.xmotor.testjavaxvalidation.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @Description 车辆类型自定义验证注解
 * @Author XUZS
 * @Date 20-2-24 15:48
 * @Version 1.0
 **/
@Documented
@Constraint(validatedBy = { PlateTypeValidator.class })
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RUNTIME)
public @interface PlateType {

    String message() default "号牌种类错误，目前只支持小型汽车(02)和新能源小型汽车(52)！";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };
}
